package com.ldzl.service;

import com.ldzl.dto.AddOutboundDTO;
import com.ldzl.pojo.CkProductSales;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 风止
* @description 针对表【ck_product_sales(销售出库单表)】的数据库操作Service
* @createDate 2025-07-24 17:24:38
*/
public interface CkProductSalesService extends IService<CkProductSales> {

    /**
     * 查询待质检的出库单
     * @param sales_code
     * @param sales_name
     * @return
     */
    List<CkProductSales> selectCkProductSales(String sales_code, String sales_name);


    /**
     * 修改出库单状态
     * @param status
     * @param sales_id
     * @return
     */
    boolean updateCkProductSalesStatusStatus(@Param("status") String status,
                                         @Param("sales_id") Long sales_id);

    /**
     * 查询所有出库单
     * @param sales
     * @return
     */
    List<CkProductSales> selectProduct_Sales(CkProductSales sales);


    /**
     * 添加出库单
     * @param outboundDTO
     * @return
     */
    int insertProduct_Sales(AddOutboundDTO outboundDTO);

    /**
     * 出库
     * @param sales_id
     * @return
     */
    boolean warehouseOutbound(Long sales_id,String update_by);

    /**
     * 删除销售订单
     * @param sales_id
     * @return
     */
    boolean updateSales_delete(Long sales_id, String update_by);

    /**
     * 批量删除销售订单
     * @param list_sales_id
     * @return
     */
    boolean deleteBatch(List<Long> list_sales_id,String update_by);
}
